// components/drop-down-selection/index.js
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    itemList: {
      type: Array,
      value: []
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    IMGBASEURL: app.globalData.IMGBASEURL,
    isOpen: false,
    acId:'',
    acLable:''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    openOrClose() {
      this.setData({
        isOpen: !this.data.isOpen
      })
    },
    onSelecet(event) {
      this.setData({
        acId:event.target.dataset.id,
        acLable:event.target.dataset.aclable
      })
      this.triggerEvent('onChange', {
        val: event.target.dataset.id
      });
    }
  }
})